<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

	    <meta name="description" content="">
	    <meta name="author" content="">
	    <title>放款操作</title>
	
	    <!-- Bootstrap core CSS -->
	    <link href="${pageContext.request.contextPath}/resources/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	
	    <!-- Custom fonts for this template --> 
	    <link href="${pageContext.request.contextPath}/resources/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	
	    <!-- Plugin CSS -->
	    <link href="${pageContext.request.contextPath}/resources/vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">
		
	    <!-- Custom styles for this template -->
	    <link href="${pageContext.request.contextPath}/resources/css/sb-admin.css" rel="stylesheet">
		<link href="${pageContext.request.contextPath}/resources/css/login.css" rel="stylesheet">
		
		<!-- uploadify -->
        <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/js/uploadify/uploadify.css" type="text/css"></link>
       
         <!-- Bootstrap core JavaScript -->
	    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/tether/tether.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/bootstrap/js/bootstrap.min.js"></script>
	
	    <!-- Plugin JavaScript -->
	    <script src="${pageContext.request.contextPath}/resources/vendor/jquery-easing/jquery.easing.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/chart.js/Chart.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/datatables/jquery.dataTables.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/datatables/dataTables.bootstrap4.js"></script>
	    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/ajaxfileupload.js"></script>    
    	<!-- Custom scripts for this template -->
   		<script src="${pageContext.request.contextPath}/resources/js/sb-admin.min.js"></script>
         
        <script>
			function f(){
				if($("#pz_file").val()==""){
					alert("请上传凭证！");
					return false;
				}else if($("#code1").val()==""){
					alert("请填写收款账号！");
					return false;
				}else if($("#code2").val()==""){
					alert("请填写放款账号！");
					return false;
				}else{
					return true;
				}
			}
		</script>
    </head>
    <body id="page-top">

    <!-- Navigation -->
    <nav id="mainNav" class="navbar static-top navbar-toggleable-md navbar-inverse bg-inverse">
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarExample" aria-controls="navbarExample" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <a class="navbar-brand" href="#">管理系统</a>
        <div class="collapse navbar-collapse" id="navbarExample">
            <ul class="sidebar-nav navbar-nav">
                <li class="nav-item ">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/customer/ordinary"><i class="fa fa-fw fa-dashboard "></i> 普通用户列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/customer/wait"><i class="fa fa-fw fa-table"></i> 待认证会员列表</a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/customer/authenticated"><i class="fa fa-fw fa-table"></i> 已认证会员列表</a>
                </li>
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/borrow"><i class="fa fa-fw fa-wrench"></i> 申请借款列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/borrow_ed"><i class="fa fa-fw fa-wrench"></i> 已借款列表</a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/repayment"><i class="fa fa-fw fa-sitemap"></i> 申请还款列表</a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/repayment_ed"><i class="fa fa-fw fa-sitemap"></i> 已还款列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/sys/cost"><i class="fa fa-fw fa-dashboard "></i>借款方案管理</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/sys/manger"><i class="fa fa-fw fa-dashboard "></i>平台客服用户管理</a>
                </li>
            </ul>
            <ul class="navbar-nav ml-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle mr-lg-2" href="#" id="messagesDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-fw fa-envelope"></i> <span class="hidden-lg-up">Messages <span class="badge badge-pill badge-primary">12 New</span></span>
                        <span class="new-indicator text-primary hidden-md-down"><i class="fa fa-fw fa-circle"></i><span class="number">12</span></span>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle mr-lg-2" href="#" id="alertsDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-fw fa-bell"></i> <span class="hidden-lg-up">Alerts <span class="badge badge-pill badge-warning">6 New</span></span>
                        <span class="new-indicator text-warning hidden-md-down"><i class="fa fa-fw fa-circle"></i><span class="number">6</span></span>
                    </a>
                </li>
                <li class="nav-item">
                    <form class="form-inline my-2 my-lg-0 mr-lg-2">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="搜索...">
                            <span class="input-group-btn">
                        <button class="btn btn-primary" type="button"><i class="fa fa-search"></i></button>
                    </span>
                        </div>
                    </form>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/sys/quit"><i class="fa fa-fw fa-sign-out"></i> 退出登录</a>
                </li>
            </ul>
        </div>
    </nav>

    <div class="content-wrapper py-3">

        <div class="container-fluid">

            <!-- Breadcrumbs -->
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="${pageContext.request.contextPath}/admin/order/borrow">申请还款列表</a></li>
                <li class="breadcrumb-item active">放款操作</li>
            </ol>

            
            
            <!-- Example Tables Card -->
            <div class="card mb-3">
                <div class="card-header">
                    <div class="radio">
					  <label>
					    放款操作
					  </label>
					</div>
                </div>
                <div class="card-block">
                    <div class="table-responsive">
                        <div class="container">
							<div class="row clearfix ">
								<div class="column col-md-8">
									<form method="post" action="${pageContext.request.contextPath}/admin/order/borrow_tab_do/${order_id}" onsubmit="return f()">
									<table>
										<div class="form-group kaozuo">
											<label class="contro">手机号：</label>
											<label class="neirong">${customer_name}</label>
										</div>
										<div class="form-group kaozuo">
											<label class="contro">收款方式：</label>
											<label class="neirong">
												<select class="form-control form-control-sm" name="customer_account_type" style="width: 100px;">
						                    		<option value="1">支付宝</option>
						                    		<option value="2">微信</option>
						                    		<option value="3">银联</option>
					                    		</select>
											</label>
										</div>
										<div class="form-group kaozuo">
											<label class="contro">收款账号：</label>
											<label class="neirong"><input type="text" id="code1" name="customer_account_code" /></label>
										</div>
										<div class="form-group kaozuo">
											<label class="contro">放款金额：</label>
											<label class="neirong">${apply_money}</label>
										</div>
										<div class="form-group kaozuo">
											 <label class="contro">上传凭证:</label>
											 <label class="neirong">
			                    			 <img src="" />
                                             <input id="fileId" name="pz" type="file" onchange="uploadfile('fileId','pz_file',this)"/>
			                    			<input name="pz_file" id="pz_file" type="hidden"/></label>											 
										</div>
										<div class="form-group kaozuo">
											<label class="contro">放款方式：</label>
											<label class="neirong">
												<select class="form-control form-control-sm" name="operate_account_code" style="width: 100px;">
						                    		<option value="1">支付宝</option>
						                    		<option value="2">微信</option>
						                    		<option value="3">银联</option>
					                    		</select></label>
										</div>
										<div class="form-group kaozuo">
											<label class="contro">放款账号：</label>
											<label class="neirong"><input type="text" id="code2" name="operate_account_code" /></label>
										</div>
										<div class="form-group text-center col-md-8">
											<input type="submit"  class="btn btn_login btn-default" value="提交" />
										</div>
									</table>
									</form>
								</div>
							</div>
						</div>
                    </div>
                </div>
                <div class="card-footer small text-muted">
                    Updated yesterday at 11:59 PM
                </div>
            </div>

        </div>
        <!-- /.container-fluid -->

    </div>
    <!-- /.content-wrapper -->

    <a class="scroll-to-top rounded" href="#page-top">
        <i class="fa fa-chevron-up"></i>
    </a>

    
    
    <script type="text/javascript">
     //异步上传图片
	    function uploadfile(fileId,id,object){
	    	
	    	$.ajaxFileUpload ({
	    		type : 'post' ,
	    		secureuri:false,//一般设置为false
	    		fileElementId:fileId,//input id
	    	  	url :  '${pageContext.request.contextPath}/util/uploadPz',
	    	    dataType: 'text' ,
	    	    success:function(data){
	    	    	$("#"+fileId).parent().find("img").attr({"src":data,"width":"100px","height":"100px"});
	    	    	$("#"+id).val(data);
	    	    }
	    	}); 
	    }
    </script>
 	</body>
</html>